Skip to content

helm: add keeper-metrics ServiceMonitor - #2048

Open
Slach wants to merge 1 commit into
0.27.3from
hotfix_helm_serviceMonitor
Open

helm: add keeper-metrics ServiceMonitor#2048
Slach wants to merge 1 commit into
0.27.3from
hotfix_helm_serviceMonitor

Conversation

@Slach

@Slach Slach commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2038

serviceMonitor.enabled created a ServiceMonitor with only ch-metrics and op-metrics endpoints, so native Keeper prometheus metrics were not scraped.

Since the existing ServiceMonitor selector targets the operator's own service, this adds a second ServiceMonitor <fullname>-keeper-metrics under the same serviceMonitor.enabled flag:

  • selector: clickhouse-keeper.altinity.com/app: chop (label set by the operator on every keeper service)
  • endpoint port name: metrics (configurable via serviceMonitor.keeperMetrics.port)
  • namespaceSelector: {any: true} by default (CHK resources usually live outside the operator namespace), configurable
  • opt-out via serviceMonitor.keeperMetrics.enabled=false, plus the usual interval, scrapeTimeout, relabelings, metricRelabelings knobs

Keeper itself must expose the prometheus endpoint via prometheus/* settings in the CHK manifest and a named metrics port in its serviceTemplate. Clusters without Keeper are unaffected — the selector matches nothing.

🤖 Generated with Claude Code

serviceMonitor.enabled now also creates a separate ServiceMonitor that
scrapes native ClickHouse Keeper prometheus endpoints from every keeper
service managed by the operator (matched by
clickhouse-keeper.altinity.com/app=chop label, port name `metrics`).
Opt-out via serviceMonitor.keeperMetrics.enabled=false.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Slach
Slach requested review from alex-zaitsev and sunsingerus and removed request for sunsingerus July 28, 2026 13:28
@Slach
Slach changed the base branch from master to 0.27.3 July 28, 2026 13:29
@Slach
Slach requested a review from sunsingerus July 28, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

serviceMonitor.enabled doesn't cover Keeper metrics

1 participant